package kz.pompei.var.error;

public class Error {
  private final int lineStart, colStart, lineEnd, colEnd;
  
  public Error(int lineStart, int colStart, int lineEnd, int colEnd) {
    this.lineStart = lineStart;
    this.colStart = colStart;
    this.lineEnd = lineEnd;
    this.colEnd = colEnd;
  }
  
  public int getColEnd() {
    return colEnd;
  }
  
  public int getLineEnd() {
    return lineEnd;
  }
  
  public int getColStart() {
    return colStart;
  }
  
  public int getLineStart() {
    return lineStart;
  }
  
  public String getMessage() {
    return "* * * * * * ERR: " + getClass().getSimpleName();
  }
  
  @Override
  public String toString() {
    return getMessage() + " at line " + getLineStart() + ", col " + getColStart();
  }
}
